<?php

class Silk_Zgb_Block_Renderer_Orders extends Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Abstract
{
	public function render(Varien_Object $row)
	{
		$id =  $row->getData($this->getColumn()->getIndex());

		$orders = Mage::getModel('sales/order')->getCollection()->addFieldToFilter('customer_id',array('eq'=>$id));
		return $orders->count();
	}
}